home *** CD-ROM | disk | FTP | other *** search
/ Champak 86 / (Vol 86) My Disc.iso / Games / restaurante_1072.swf / scripts / __Packages / Door.as < prev    next >
Text File  |  2009-04-16  |  5KB  |  142 lines

  1. if(true)
  2. {
  3.    if(true)
  4.    {
  5.       ┬º┬ºpush(false);
  6.    }
  7.    if(!┬º┬ºpop())
  8.    {
  9.       if(true)
  10.       {
  11.          if(true)
  12.          {
  13.             ┬º┬ºpush(false);
  14.          }
  15.          if(!┬º┬ºpop())
  16.          {
  17.             if(!_global.Door)
  18.             {
  19.                var _loc2_ = _global.Door = function($mc)
  20.                {
  21.                   this.fixedList = [0,1,2,3,4,4,5,5,0,1,2,3];
  22.                   this._mc = $mc;
  23.                   this.customers = new Array();
  24.                   this.createCustomer();
  25.                   this.addInterval = setInterval(this,"createCustomer",this.addDelay);
  26.                }.prototype;
  27.                _loc2_.__get__customersArray = function()
  28.                {
  29.                   return this.customers;
  30.                };
  31.                _loc2_.__get__mc = function()
  32.                {
  33.                   return this._mc;
  34.                };
  35.                _loc2_.__get__isEmpty = function()
  36.                {
  37.                   return this.maxNum <= 0 && this.customers.length <= 0;
  38.                };
  39.                _loc2_.customerLeave = function(c)
  40.                {
  41.                   var _loc2_ = 0;
  42.                   while(_loc2_ < this.customers.length)
  43.                   {
  44.                      if(this.customers[_loc2_] == c)
  45.                      {
  46.                         this.customers.splice(_loc2_,1);
  47.                         this.refresh();
  48.                         Mission.getMission().checkEnd();
  49.                         break;
  50.                      }
  51.                      _loc2_ = _loc2_ + 1;
  52.                   }
  53.                };
  54.                _loc2_.stopAddCustomer = function()
  55.                {
  56.                   clearInterval(this.addInterval);
  57.                };
  58.                _loc2_.createCustomer = function()
  59.                {
  60.                   if(this.__get__numCustomers() >= MissionData.DATA[Mission.getMission().__get__id()].listNum)
  61.                   {
  62.                      return undefined;
  63.                   }
  64.                   if(this.maxNum <= 0)
  65.                   {
  66.                      this.stopAddCustomer();
  67.                      return undefined;
  68.                   }
  69.                   this.maxNum = this.maxNum - 1;
  70.                   var _loc2_ = Mission.current != 0 ? random(6) : this.fixedList.shift();
  71.                   var _loc5_ = this.__get__mc().attachMovie(CustomerType.__get__TYPES()[_loc2_],CustomerType.__get__TYPES()[_loc2_] + getTimer(),this.__get__mc().getNextHighestDepth(),{_x:0,_y:0});
  72.                   var _loc4_ = new Customer(_loc5_,_loc2_);
  73.                   this.customers.push(_loc4_);
  74.                   this.refresh();
  75.                   var _loc3_ = new Sound();
  76.                   _loc3_.attachSound("DoorSnd");
  77.                   _loc3_.start();
  78.                   return _loc4_;
  79.                };
  80.                _loc2_.refresh = function()
  81.                {
  82.                   var _loc2_ = 0;
  83.                   while(_loc2_ < this.__get__numCustomers())
  84.                   {
  85.                      var _loc3_ = Customer(this.customers[_loc2_]);
  86.                      _loc3_.__get__mc().swapDepths(MissionData.DATA[Mission.getMission().__get__id()].listNum - _loc2_);
  87.                      if(!_loc3_.__get__isDragging())
  88.                      {
  89.                         _loc3_.__get__mc()._x = _loc2_ * -50 + 150;
  90.                         _loc3_.__get__mc()._y = 0;
  91.                      }
  92.                      _loc2_ = _loc2_ + 1;
  93.                   }
  94.                };
  95.                _loc2_.reduceCustomer = function(c)
  96.                {
  97.                   var _loc2_ = 0;
  98.                   while(_loc2_ < this.__get__numCustomers())
  99.                   {
  100.                      if(this.customers[_loc2_] == c)
  101.                      {
  102.                         this.customers.splice(_loc2_,1);
  103.                         break;
  104.                      }
  105.                      _loc2_ = _loc2_ + 1;
  106.                   }
  107.                   this.refresh();
  108.                };
  109.                _loc2_.__get__numCustomers = function()
  110.                {
  111.                   return this.customers.length;
  112.                };
  113.                _loc2_._numCustomers = 0;
  114.                _loc2_.maxNum = 12;
  115.                _loc2_.addDelay = 2000;
  116.                ┬º┬ºpush(_loc2_.addProperty("customersArray",_loc2_.__get__customersArray,function()
  117.                {
  118.                }
  119.                ));
  120.                ┬º┬ºpush(_loc2_.addProperty("isEmpty",_loc2_.__get__isEmpty,function()
  121.                {
  122.                }
  123.                ));
  124.                ┬º┬ºpush(_loc2_.addProperty("mc",_loc2_.__get__mc,function()
  125.                {
  126.                }
  127.                ));
  128.                ┬º┬ºpush(_loc2_.addProperty("numCustomers",_loc2_.__get__numCustomers,function()
  129.                {
  130.                }
  131.                ));
  132.                ┬º┬ºpush(ASSetPropFlags(_global.Door.prototype,null,1));
  133.             }
  134.             ┬º┬ºpop();
  135.          }
  136.       }
  137.       ┬º┬ºgoto(addr404);
  138.    }
  139.    gotoAndStop("∩┐╜J∩┐╜∩┐╜X∩┐╜?∩┐╜N8]∩┐╜v∩┐╜∩┐╜∩┐╜∩┐╜∩┐╜∩┐╜∩┐╜0q∩┐╜#\f∩┐╜q∩┐╜I\t5]Cl∩┐╜\x18∩┐╜D<j\\ktE∩┐╜o∩┐╜\n∩┐╜R ╔í>∩┐╜∩┐╜ ∩┐╜∩┐╜0K∩┐╜∩┐╜\x05∩┐╜x");
  140. }
  141. addr404:
  142.